/*----------------------------------------------------------------------
  - File name      : STC8Ax_EEPROM.h
  - Author         : Quark Team
  - Update date    : 2020-12-09                   
  -	Copyright      : Gevico Electronic studio   
  - Module comments: Header file of EEPROM module.
-----------------------------------------------------------------------*/
#ifndef __STC8Ax_EEPROM_H_
#define __STC8Ax_EEPROM_H_
/*-----------------------------------------------------------------------
|                               INCLUDES                                |
-----------------------------------------------------------------------*/
/*--------------------------------------------------------
| @Description: STC8Ax Options                           |
--------------------------------------------------------*/
#include "STC8Ax_REG.h"   
/*--------------------------------------------------------
| @Description: STC8Ax core                              |
--------------------------------------------------------*/
#include "STC8Ax_CORE.h"
/*-----------------------------------------------------------------------
|                                 DATA                                  |
-----------------------------------------------------------------------*/
/*--------------------------------------------------------
| @Description: System clock frequency                   |
--------------------------------------------------------*/
extern uint32 SYSCLK_FRE;
/*-----------------------------------------------------------------------
|                             API FUNCTION                              |
-----------------------------------------------------------------------*/
/*--------------------------------------------------------
| @Description: EEPROM get working state define          |
--------------------------------------------------------*/
#define EEPROM_GET_STATE() (IAP_CONTR & 0x01)
/*--------------------------------------------------------
| @Description: EEPROM working function                  |
--------------------------------------------------------*/
FSCSTATE EEPROM_Ctrl(FUNSTATE State);
FSCSTATE EEPROM_Erase_Page(uint16 Addr);
FSCSTATE EEPROM_Read_Byte(uint16 Addr,uint8 *Byte);
FSCSTATE EEPROM_Write_Byte(uint16 Addr,const uint8 Byte);
FSCSTATE EEPROM_Write_Str(uint16 Addr,const uint8 *Str);
FSCSTATE EEPROM_Read_Buff(uint16 Addr,uint8 *Str,uint8 Len);
FSCSTATE EEPROM_Write_Buff(uint16 Addr,const uint8 *Str,uint8 Len);

#endif
/*-----------------------------------------------------------------------
|          END OF FLIE        (C) COPYRIGHT Gevico Electronics          | 
-----------------------------------------------------------------------*/

